package com.cheng.spider.analyze;

import com.cheng.spider.exception.UnsupportedStatusCodeException;
import org.apache.http.HttpResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SimpleStatusCodeResolver extends AbstractStatusCodeResolver {

    private static final Logger LOGGER = LoggerFactory.getLogger(SimpleStatusCodeResolver.class);

    protected void caseErrorCode(HttpResponse response) {
        throw new UnsupportedStatusCodeException("不支持的响应状态码：" + response.getStatusLine().getStatusCode());
    }

    protected void case304(HttpResponse response) {
        throw new UnsupportedStatusCodeException("不支持的响应状态码：" + response.getStatusLine().getStatusCode());
    }

    protected void case302(HttpResponse response) {
        throw new UnsupportedStatusCodeException("不支持的响应状态码：" + response.getStatusLine().getStatusCode());
    }

    protected void case200(HttpResponse response) {

    }
}
